Integrand size = 17, antiderivative size = 31 \[ \int \frac {\cot ^2(x)}{\sqrt {a+a \cot ^2(x)}} \, dx=\frac {\cot (x)}{\sqrt {a \csc ^2(x)}}-\frac {\text {arctanh}(\cos (x)) \csc (x)}{\sqrt {a \csc ^2(x)}} \]
[Out]
Time = 0.12 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.294, Rules used = {3738, 4210, 2672, 327, 212} \[ \int \frac {\cot ^2(x)}{\sqrt {a+a \cot ^2(x)}} \, dx=\frac {\cot (x)}{\sqrt {a \csc ^2(x)}}-\frac {\csc (x) \text {arctanh}(\cos (x))}{\sqrt {a \csc ^2(x)}} \]
[In]
[Out]
Rule 212
Rule 327
Rule 2672
Rule 3738
Rule 4210
Rubi steps \begin{align*} \text {integral}& = \int \frac {\cot ^2(x)}{\sqrt {a \csc ^2(x)}} \, dx \\ & = \frac {\csc (x) \int \cos (x) \cot (x) \, dx}{\sqrt {a \csc ^2(x)}} \\ & = -\frac {\csc (x) \text {Subst}\left (\int \frac {x^2}{1-x^2} \, dx,x,\cos (x)\right )}{\sqrt {a \csc ^2(x)}} \\ & = \frac {\cot (x)}{\sqrt {a \csc ^2(x)}}-\frac {\csc (x) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\cos (x)\right )}{\sqrt {a \csc ^2(x)}} \\ & = \frac {\cot (x)}{\sqrt {a \csc ^2(x)}}-\frac {\text {arctanh}(\cos (x)) \csc (x)}{\sqrt {a \csc ^2(x)}} \\ \end{align*}
Time = 0.15 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.03 \[ \int \frac {\cot ^2(x)}{\sqrt {a+a \cot ^2(x)}} \, dx=\frac {\csc (x) \left (\cos (x)-\log \left (\cos \left (\frac {x}{2}\right )\right )+\log \left (\sin \left (\frac {x}{2}\right )\right )\right )}{\sqrt {a \csc ^2(x)}} \]
[In]
[Out]
Time = 0.04 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.23
method | result | size |
derivativedivides | \(-\frac {\ln \left (\sqrt {a}\, \cot \left (x \right )+\sqrt {a +a \cot \left (x \right )^{2}}\right )}{\sqrt {a}}+\frac {\cot \left (x \right )}{\sqrt {a +a \cot \left (x \right )^{2}}}\) | \(38\) |
default | \(-\frac {\ln \left (\sqrt {a}\, \cot \left (x \right )+\sqrt {a +a \cot \left (x \right )^{2}}\right )}{\sqrt {a}}+\frac {\cot \left (x \right )}{\sqrt {a +a \cot \left (x \right )^{2}}}\) | \(38\) |
risch | \(\frac {i {\mathrm e}^{2 i x}}{2 \sqrt {-\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}}\, \left ({\mathrm e}^{2 i x}-1\right )}+\frac {i}{2 \left ({\mathrm e}^{2 i x}-1\right ) \sqrt {-\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}}}-\frac {i {\mathrm e}^{i x} \ln \left ({\mathrm e}^{i x}+1\right )}{\sqrt {-\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}}\, \left ({\mathrm e}^{2 i x}-1\right )}+\frac {i {\mathrm e}^{i x} \ln \left ({\mathrm e}^{i x}-1\right )}{\sqrt {-\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}}\, \left ({\mathrm e}^{2 i x}-1\right )}\) | \(157\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 77 vs. \(2 (27) = 54\).
Time = 0.28 (sec) , antiderivative size = 77, normalized size of antiderivative = 2.48 \[ \int \frac {\cot ^2(x)}{\sqrt {a+a \cot ^2(x)}} \, dx=\frac {\sqrt {2} \sqrt {-\frac {a}{\cos \left (2 \, x\right ) - 1}} \sin \left (2 \, x\right ) + \sqrt {a} \log \left (\frac {2 \, \sqrt {2} \sqrt {a} \sqrt {-\frac {a}{\cos \left (2 \, x\right ) - 1}} \sin \left (2 \, x\right ) - a \cos \left (2 \, x\right ) - 3 \, a}{\cos \left (2 \, x\right ) - 1}\right )}{2 \, a} \]
[In]
[Out]
\[ \int \frac {\cot ^2(x)}{\sqrt {a+a \cot ^2(x)}} \, dx=\int \frac {\cot ^{2}{\left (x \right )}}{\sqrt {a \left (\cot ^{2}{\left (x \right )} + 1\right )}}\, dx \]
[In]
[Out]
none
Time = 0.37 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.87 \[ \int \frac {\cot ^2(x)}{\sqrt {a+a \cot ^2(x)}} \, dx=-\frac {\sqrt {-a} {\left (\arctan \left (\sin \left (x\right ), \cos \left (x\right ) + 1\right ) - \arctan \left (\sin \left (x\right ), \cos \left (x\right ) - 1\right )\right )}}{a} \]
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.58 \[ \int \frac {\cot ^2(x)}{\sqrt {a+a \cot ^2(x)}} \, dx=\frac {1}{2} \, \sqrt {a} {\left (\frac {2 \, \cos \left (x\right )}{a \mathrm {sgn}\left (\sin \left (x\right )\right )} - \frac {\log \left (\cos \left (x\right ) + 1\right )}{a \mathrm {sgn}\left (\sin \left (x\right )\right )} + \frac {\log \left (-\cos \left (x\right ) + 1\right )}{a \mathrm {sgn}\left (\sin \left (x\right )\right )}\right )} \]
[In]
[Out]
Timed out. \[ \int \frac {\cot ^2(x)}{\sqrt {a+a \cot ^2(x)}} \, dx=\int \frac {{\mathrm {cot}\left (x\right )}^2}{\sqrt {a\,{\mathrm {cot}\left (x\right )}^2+a}} \,d x \]
[In]
[Out]